﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace EchoClient
{
    class Program
    {
        protected static readonly log4net.ILog log = log4net.LogManager.GetLogger("test");

        static void Initialize()
        {
            log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo("EchoClient.log4net.xml"));
            WC.Utils.GCEnv.SetToForceGC(30000, 30000);
        }
        static void test_proc(object obj)
        {
            WC.PilotClient.ClientTesting.DoSomething();
        }

        static void Main(string[] args)
        {
            Initialize();
            log.Info("-----------------------------------------------");
            
            if (true)
            {
                Thread th = new Thread(new ParameterizedThreadStart(test_proc));
                th.Start(null);
            }

            Console.WriteLine("\nPress a key to exit...");
            while (ConsoleKey.Escape != Console.ReadKey(true).Key)
            {
                WC.Pattern.Singleton<WC.Net.NetStatistics>.Instance.Print(log);
            }
            log.Info("-----------------------------------------------");

        }
    }
}
